" 取消以name键开头的所有映射，相当于取消':map <name>', ':map! <name>'列出的映射。
function utils#mappings#Unmaps(name)
    redir => s:output
    execute "silent map " . a:name
    execute "silent map! " . a:name
    redir END

    for line in split(s:output, "\n")
        if line !~# '\v^[ nvsxo!ilc]{2} \S'
            continue
        endif

        let modes = line[0:1]
        let keys = matchstr(line, '\v\S+', 3)

        if modes == '  '
            execute "unmap " . keys
        elseif modes == '! '
            execute "unmap! " . keys
        endif
    endfor
endfunction
